import * as API from '../utils/api'

export const LOAD_MEETING_ROOM_LIST = "LOAD_MEETING_ROOM_LIST"
export const UPDATE_MEETING_ROOM_LIST = "UPDATE_MEETING_ROOM_LIST"
export const loadMeetingRoomList = ({page = 1}) => dispatch => 
( 
    API.fetchMeetingRoomList({page})
    .then(json => dispatch(updateMeetingRoomList({...json})))
)


export const updateMeetingRoomList = list => ({type: UPDATE_MEETING_ROOM_LIST, list})
